/*
 * Copyright (c) 2012-2014, EpicSaaS Yuan Xin technology Co., Ltd.
 * 
 * All rights reserved.
 */
package com.epicsaas.app.ksdapp.service;

import java.util.List;

import javax.annotation.Resource;

import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;

import com.epicsaas.app.ksdapp.android.bean.Product;
import com.epicsaas.app.ksdapp.dao.customized.ProductCustomziedMapper;
import com.epicpaas.sdk.core.api.logging.Logger;
import com.epicpaas.sdk.core.api.logging.LoggerFactory;

@Service
public class ProductService implements IProductService {

    private static Logger LOG = LoggerFactory.getLogger(ProductService.class);

    @Resource
    private ProductCustomziedMapper productCustomziedMapper;

    @Override
    public List<Product> getRecommendsByUid(String uid) {
        // TODO Auto-generated method stub
        LOG.info("uid = %s", uid);
        return productCustomziedMapper.getRecommendsByUid(uid);
    }

    @Override
    public List<Product> getProductsByShopidAndUid(String shopid, String uid, String productname) {
        // TODO Auto-generated method stub
        LOG.info("shopid = %s ,uid = %s", shopid, uid);
        return productCustomziedMapper.getProductsByShopidAndUid(shopid, uid, productname);
    }

    @Override
    public List<Product> getProductsByShopidAndShopitemid(String shopid, String shopitemid) {
        LOG.info("shopid = %s ,shopitemid = %s", shopid, shopitemid);
        return productCustomziedMapper.getProductsByShopidAndShopitemid(shopid, shopitemid);
    }

    @Override
    public List<Product> getProductsByUidAndProductid(String uid, String productid) {
        // TODO Auto-generated method stub
        return productCustomziedMapper.getProductsByUidAndProductid(uid, productid);
    }

}
